package patterns.flyweight;

/**
 * Created by lenovo on 2016/11/28 0028.
 * 接口实现类，定义具体形状类的特有属性
 */
public class Circle implements IShape {
    private String color;//颜色
    private int x;//圆心x坐标
    private int y;//圆心y坐标
    private int radius;//圆的半径

    public Circle(String color){
        this.color = color;
    }

    public void setX(int x) {
        this.x = x;
    }

    public void setY(int y) {
        this.y = y;
    }

    public void setRadius(int radius) {
        this.radius = radius;
    }

    @Override
    public void draw() {
        System.out.printf("圆形绘制，颜色：%s,半径：%d,圆心坐标：（%d，%d）",color,radius,x,y);
        System.out.println();
    }
}
